package cn.jdy.djgaj.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import cn.jdy.common.bo.BaseEntry;
import cn.jdy.platform.entity.ConfValue;

/**
 * @desc   东津公安局新闻实体类 
 * @author ningqian
 * @date   2016-10-26
 */
@Entity
public class DjgajNews extends BaseEntry implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)//根据数据库自动适配 mysql默认自增
	private Long id;        //主键
	private String title;      //标题
	private String author;      //作者
	@Column(columnDefinition = "longtext")
	private String context;      //内容
	private String summary;      //摘要
	private String keyword;      //关键词
	private String originAddress;  //来源
	@Column(updatable = false) // 第一次增加之后不可修改
	private String userid;      //发布人
	private String username;    //发布人
	private Integer readTimes;    //阅读次数
	private Integer goodtimes;    //点蛅次数
	private String imgUrl;      //封面图片地址
	private String status;      //状态 0：无效/未审核，1：有效/审核通过/未复签，2：审核不过, 3: 置顶（每一分类仅一条消息能被置顶），4：已复签
	//新增属性
	private String openStatus;
//		文件公开属性--5：主动公开，6：申请公开，7：不予公开
	private String department; //投稿部门
//		private String[] locations=new String[13];; //投稿所在辖区
	private String falseCreateTime;//假时间
	private String depars;//将部门由数组转换成字符串
	private String transforms;//是否写入Associations和RemoteAssociations,已写设置为1，

	//市局文件、简报调研
	private String fileTypes;  //文件模板 1东津公发 2东津公党委 3其他
	private String bulletinID;//简报编号
	private String isSigned;//签发人
	private String isChecked;//核稿人
	private String isHeld;//承办人
	
	//新增URL字段
	private String isURL;//如果URL为空，跳转show-;如果不为空，跳转对应URL
	@Column(columnDefinition="varchar(255) default '0'")
	private String topTime;// 顶置日期
	private String isNews;// 是否加入new图标
	
	private String beTopString;//置顶：0-选择；1：置顶
	private String isRed;//文章标题是否标红：0-否；1-是
	private String isSignNews; //文章是否需要签收 0-不需要签收，1-需要签收
	private String signStatus;  //状态 0：未签收，1：已签收
	private String signDepartment; //东津公安分局签收单位（东津公安局签收字段）
	
	private String teams;      //支队数目1,2,3,4,5;
	//需要签收单位-每个单元对应一个签收单位，有46+新增3个+zhddk换成zhzx=49+暂不用jymsk；
	private String[] associations;
	//每个单元有值即为需要签收，无值则不需要签收
	private String[] assocGrops=new String[4];//4个签收单位群
	private String iscolums;      //是否加入到公告栏    0-否 ，1-加入
	
	private String isarticle;      //是否从投稿管理产生的数据
	
	
	public String getIsarticle() {
		return isarticle;
	}

	public void setIsarticle(String isarticle) {
		this.isarticle = isarticle;
	}

	public String getIscolums() {
		return iscolums;
	}

	public void setIscolums(String iscolums) {
		this.iscolums = iscolums;
	}

	public String getIsNews() {
		return isNews;
	}

	public void setIsNews(String isNews) {
		this.isNews = isNews;
	}

	public String getIsURL() {
		return isURL;
	}

	public void setIsURL(String isURL) {
		this.isURL = isURL;
	}

	@Column(nullable = false)
	private Long columnId;

	@ManyToOne
	@JoinColumn(name = "columnId", insertable = false, updatable = false)
	private ConfValue cv;
	
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public ConfValue getCv() {
		return cv;
	}

	public void setCv(ConfValue cv) {
		this.cv = cv;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public Integer getGoodtimes() {
		return goodtimes;
	}

	public void setGoodtimes(Integer goodtimes) {
		this.goodtimes = goodtimes;
	}

	public Integer getReadTimes() {
		return readTimes;
	}

	public void setReadTimes(Integer readTimes) {
		this.readTimes = readTimes;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getOriginAddress() {
		return originAddress;
	}

	public void setOriginAddress(String originAddress) {
		this.originAddress = originAddress;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getContext() {
		return context;
	}

	public void setContext(String context) {
		this.context = context;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getColumnId() {
		return columnId;
	}

	public void setColumnId(Long columnId) {
		this.columnId = columnId;
	}
	public String getOpenStatus() {
		return openStatus;
	}

	public void setOpenStatus(String openStatus) {
		this.openStatus = openStatus;
	}


	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public String getFalseCreateTime() {
		return falseCreateTime;
	}

	public void setFalseCreateTime(String falseCreateTime) {
		this.falseCreateTime = falseCreateTime;
	}

	public String getDepars() {
		return depars;
	}

	public void setDepars(String depars) {
		this.depars = depars;
	}


	public String getFileTypes() {
		return fileTypes;
	}

	public void setFileTypes(String fileTypes) {
		this.fileTypes = fileTypes;
	}

	public String getBulletinID() {
		return bulletinID;
	}

	public void setBulletinID(String bulletinID) {
		this.bulletinID = bulletinID;
	}

	public String getIsSigned() {
		return isSigned;
	}

	public void setIsSigned(String isSigned) {
		this.isSigned = isSigned;
	}

	public String getIsChecked() {
		return isChecked;
	}

	public void setIsChecked(String isChecked) {
		this.isChecked = isChecked;
	}

	public String getIsHeld() {
		return isHeld;
	}

	public void setIsHeld(String isHeld) {
		this.isHeld = isHeld;
	}

	public String getTopTime() {
		return topTime;
	}

	public void setTopTime(String topTime) {
		this.topTime = topTime;
	}

	public String getTransforms() {
		return transforms;
	}

	public void setTransforms(String transforms) {
		this.transforms = transforms;
	}

	public String getBeTopString() {
		return beTopString;
	}

	public void setBeTopString(String beTopString) {
		this.beTopString = beTopString;
	}

	public String getIsRed() {
		return isRed;
	}

	public void setIsRed(String isRed) {
		this.isRed = isRed;
	}
	

	public String getIsSignNews() {
		return isSignNews;
	}

	public void setIsSignNews(String isSignNews) {
		this.isSignNews = isSignNews;
	}

	public String getSignStatus() {
		return signStatus;
	}

	public void setSignStatus(String signStatus) {
		this.signStatus = signStatus;
	}

	public String getTeams() {
		return teams;
	}

	public void setTeams(String teams) {
		this.teams = teams;
	}

	public String[] getAssociations() {
		return associations;
	}

	public void setAssociations(String[] associations) {
		this.associations = associations;
	}

	public String[] getAssocGrops() {
		return assocGrops;
	}

	public void setAssocGrops(String[] assocGrops) {
		this.assocGrops = assocGrops;
	}

	public String getSignDepartment() {
		return signDepartment;
	}

	public void setSignDepartment(String signDepartment) {
		this.signDepartment = signDepartment;
	}
	
}
